# 利用 break 和 continue 重构猜数字游戏
import random

random_num = random.randint(1, 11)

judge = True

while judge:
    guess_num = int(input("Please input a number which type is int:"))
    if guess_num > random_num:
        print("The number you input is big.")
    if guess_num < random_num:
        print("The number you input is small.")
    if guess_num == random_num:
        print("Good Job.")
        break
    go_on = input("Do you want to challenge again?(y/n):")

    if ("y" == go_on) | ("Y" == go_on):
        continue
    if ("n" == go_on) | ("N" == go_on):
        break
    else:
        print("The info you inputed is error!".center(60, "="))
        break
